package com.icode.core.model.house;

import com.icode.core.dto.house.ForEnumDTO;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Created with IntelliJ IDEA.
 * User: SunKai
 * Date: 14-10-26
 * Time: 下午6:06
 * To change this template use File | Settings | File Templates.
 */
public enum BedType {
    BIG_BED("大床"),
    ONE_BED("单人床"),
    TWO_BED("双人床");
    private String label;

    public String getLabel() {
        return label;
    }

    private BedType(String label) {
        this.label = label;
    }

    public static List<String> getValues(){
        List<String> values=new ArrayList<>();
        for(BedType  bedType:BedType.values()){
           String value=bedType.name();
            values.add(value);
        }
        return values;
    }

    public String getValue(){
        return name();
    }

    public void setValue(){

    }

    public static List<ForEnumDTO> toDTO() {
        List<ForEnumDTO> forEnumDTOs=new ArrayList<>();
        for(BedType  bedType:BedType.values()){
            String value=bedType.name();
            String label=bedType.getLabel();
            ForEnumDTO forEnumDTO=new ForEnumDTO(value,label);
            forEnumDTOs.add(forEnumDTO);
         }
        return forEnumDTOs;
    }
}
